package edu.upc.fib.lamsandroid.server.api.response.user;

import edu.upc.fib.lamsandroid.server.api.response.Response;

public class LoginResponse extends Response<String> {

    //TODO: enum
    public static final int WRONG_CREDENTIALS = 1;
    public static final int ALREADY_LOGGED = 2;

    public static final LoginResponse IS_SUCCESSFUL;
    public static final LoginResponse HAS_WRONG_CREDENTIALS;
    public static final LoginResponse IS_ALREADY_LOGGED;

    static {
        IS_SUCCESSFUL = new LoginResponse();
        HAS_WRONG_CREDENTIALS = new LoginResponse(WRONG_CREDENTIALS , "Wrong credentials provided");
        IS_ALREADY_LOGGED = new LoginResponse(ALREADY_LOGGED, "The user is already logged.");
    }

    public LoginResponse() {
        super();
    }

    public LoginResponse(int code, String payload) {
        super(code, payload);
    }
}
